<template>
	<view class="">
		<u-navbar title="账号与安全" autoBack placeholder></u-navbar>
		<view class="p-2 bg-white flex align-center border-bottom" @click="$u.route('pages/user/changephone')">
			<view class="font-28 text-light7F">手机号</view>
			<view class="ml-auto flex align-center">
				<view class="font-28 text-main mr-1">{{dataInfo.mobile}}</view>
				<u-icon name="arrow-right" ></u-icon>
			</view>
		</view>
		<view v-if="$u.platform !== 'mp'" class="p-2 bg-white flex align-center border-bottom" @click="$u.route('pages/user/changeloginpwd')">
			<view class="font-28 text-light7F">登录密码</view>
			<view class="ml-auto flex align-center">
				<view class="font-28 text-main mr-1">{{dataInfo.login_pw===1?'已设置':'设置登录密码'}} </view>
				<u-icon name="arrow-right" ></u-icon>
			</view>
		</view>
		<view class="p-2 bg-white flex align-center border-bottom" @click="$u.route('pages/user/changepaypwd')">
			<view class="font-28 text-light7F">支付密码</view>
			<view class="ml-auto flex align-center">
				<view class="font-28 text-main mr-1">{{dataInfo.pay_pw===1?'已设置':'设置支付密码'}} </view>
				<u-icon name="arrow-right" ></u-icon>
			</view>
		</view>
		
	</view>
</template>

<script>
	export default{
		data(){
			return{
				dataInfo:{}
			}
		},
		onShow() {
			
			this.getPersonal()
		},
		methods:{
			getPersonal() {
				this.$api.user().then(res => {
					if (res.code === 1) {
						this.dataInfo = res.data
					}
				})
			},
		}
	}
</script>

<style>
</style>